import 'package:mobx/mobx.dart';
import 'package:dio/dio.dart';
import 'package:bookapp/api/http.dart';

//run this command to generate code
//flutter packages pub run build_runner build

part 'login_store.g.dart';

class LoginStore = _LoginStore with _$LoginStore;

LoginStore $store = LoginStore();

abstract class _LoginStore with Store {
  @observable
  bool tile = false;
  @observable
  num count = 10;

  @action
  void setTile(String key,dynamic value) => tile = value;

  @action
  num counter() => this.count++;

  void getInfo() async {
    Response response = await HttpRequest().dio.get("http://api.soscoon.com/playlist/hot");
    print(response);
  }
}